<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>二维码测试页面</title>
</head>
<body>
	<button type="button">生成二维码</button><br>
	<img alt="暂无图片" src="">
</body>
<script src="jquery.js"></script>
<script>
	$("button").click(function(){
		$.ajax({
			url: "/wx/getQrCode",
			type: "get",
			dataType: "json",
			success: function(resp){
				console.log(resp);
				var src = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+resp.ticket;
				$("img").attr("src",src)
			}
		})
	})
</script>
</html>